<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>someKnowledge | Ametshy_blog</title>
    <meta name="generator" content="VuePress 1.8.2">
    <link rel="icon" href="/my_blog/favicon.ico">
    <meta name="description" content="优秀的人如温玉，光华敛于内而不形于外。">
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no">
    
    <link rel="preload" href="/my_blog/assets/css/0.styles.95786cb5.css" as="style"><link rel="preload" href="/my_blog/assets/js/app.cff69041.js" as="script"><link rel="preload" href="/my_blog/assets/js/3.7a043b16.js" as="script"><link rel="preload" href="/my_blog/assets/js/1.c06040f4.js" as="script"><link rel="preload" href="/my_blog/assets/js/17.06159aba.js" as="script"><link rel="prefetch" href="/my_blog/assets/js/10.59944bfc.js"><link rel="prefetch" href="/my_blog/assets/js/11.fb77baad.js"><link rel="prefetch" href="/my_blog/assets/js/12.52311b30.js"><link rel="prefetch" href="/my_blog/assets/js/13.52369ac6.js"><link rel="prefetch" href="/my_blog/assets/js/14.b902e744.js"><link rel="prefetch" href="/my_blog/assets/js/15.4a0d7f91.js"><link rel="prefetch" href="/my_blog/assets/js/16.a086f842.js"><link rel="prefetch" href="/my_blog/assets/js/4.54a99e11.js"><link rel="prefetch" href="/my_blog/assets/js/5.5c893200.js"><link rel="prefetch" href="/my_blog/assets/js/6.d532c4e4.js"><link rel="prefetch" href="/my_blog/assets/js/7.f74d9027.js"><link rel="prefetch" href="/my_blog/assets/js/8.a07eb38b.js"><link rel="prefetch" href="/my_blog/assets/js/9.609694ba.js">
    <link rel="stylesheet" href="/my_blog/assets/css/0.styles.95786cb5.css">
  </head>
  <body>
    <div id="app" data-server-rendered="true"><div class="theme-container" data-v-3def6117><div data-v-3def6117><div id="loader-wrapper" class="loading-wrapper" data-v-2c578df8 data-v-3def6117 data-v-3def6117><div class="loader-main" data-v-2c578df8><div data-v-2c578df8></div><div data-v-2c578df8></div><div data-v-2c578df8></div><div data-v-2c578df8></div></div> <!----> <!----></div> <div class="password-shadow password-wrapper-out" style="display:none;" data-v-70a509e9 data-v-3def6117 data-v-3def6117><h3 class="title" data-v-70a509e9 data-v-70a509e9>Ametshy_blog</h3> <p class="description" data-v-70a509e9 data-v-70a509e9>优秀的人如温玉，光华敛于内而不形于外。</p> <label id="box" class="inputBox" data-v-70a509e9 data-v-70a509e9><input type="password" value="" data-v-70a509e9> <span data-v-70a509e9>Konck! Knock!</span> <button data-v-70a509e9>OK</button></label> <div class="footer" data-v-70a509e9 data-v-70a509e9><span data-v-70a509e9><i class="iconfont reco-theme" data-v-70a509e9></i> <a target="blank" href="https://vuepress-theme-reco.recoluan.com" data-v-70a509e9>vuePress-theme-reco</a></span> <span data-v-70a509e9><i class="iconfont reco-copyright" data-v-70a509e9></i> <a data-v-70a509e9><span data-v-70a509e9>fh</span>
            
          <!---->
          2021
        </a></span></div></div> <div class="hide" data-v-3def6117><header class="navbar" data-v-3def6117><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/my_blog/" class="home-link router-link-active"><img src="/my_blog/logo.png" alt="Ametshy_blog" class="logo"> <span class="site-name">Ametshy_blog</span></a> <div class="links"><div class="color-picker"><a class="color-button"><i class="iconfont reco-color"></i></a> <div class="color-picker-menu" style="display:none;"><div class="mode-options"><h4 class="title">Choose mode</h4> <ul class="color-mode-options"><li class="dark">dark</li><li class="auto active">auto</li><li class="light">light</li></ul></div></div></div> <div class="search-box"><i class="iconfont reco-search"></i> <input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/my_blog/" class="nav-link"><i class="iconfont reco-home"></i>
  首页
</a></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title"><i class="iconfont reco-category"></i>
      文章分类
    </span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/my_blog/categories/other/" class="nav-link"><i class="undefined"></i>
  other
</a></li><li class="dropdown-item"><!----> <a href="/my_blog/categories/font-end/" class="nav-link"><i class="undefined"></i>
  font-end
</a></li></ul></div></div><div class="nav-item"><a href="/my_blog/tag/" class="nav-link"><i class="iconfont reco-tag"></i>
  标签
</a></div><div class="nav-item"><a href="/my_blog/timeline/" class="nav-link"><i class="iconfont reco-date"></i>
  时间轴
</a></div><div class="nav-item"><a href="/my_blog/docs/theme-reco/" class="nav-link router-link-active"><i class="iconfont reco-message"></i>
  文章列表
</a></div> <!----></nav></div></header> <div class="sidebar-mask" data-v-3def6117></div> <aside class="sidebar" data-v-3def6117><div class="personal-info-wrapper" data-v-1a7245e0 data-v-3def6117><img src="/my_blog/avatar.jpg" alt="author-avatar" class="personal-img" data-v-1a7245e0> <h3 class="name" data-v-1a7245e0>
    fh
  </h3> <div class="num" data-v-1a7245e0><div data-v-1a7245e0><h3 data-v-1a7245e0>7</h3> <h6 data-v-1a7245e0>文章</h6></div> <div data-v-1a7245e0><h3 data-v-1a7245e0>3</h3> <h6 data-v-1a7245e0>标签</h6></div></div> <ul class="social-links" data-v-1a7245e0></ul> <hr data-v-1a7245e0></div> <nav class="nav-links"><div class="nav-item"><a href="/my_blog/" class="nav-link"><i class="iconfont reco-home"></i>
  首页
</a></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title"><i class="iconfont reco-category"></i>
      文章分类
    </span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/my_blog/categories/other/" class="nav-link"><i class="undefined"></i>
  other
</a></li><li class="dropdown-item"><!----> <a href="/my_blog/categories/font-end/" class="nav-link"><i class="undefined"></i>
  font-end
</a></li></ul></div></div><div class="nav-item"><a href="/my_blog/tag/" class="nav-link"><i class="iconfont reco-tag"></i>
  标签
</a></div><div class="nav-item"><a href="/my_blog/timeline/" class="nav-link"><i class="iconfont reco-date"></i>
  时间轴
</a></div><div class="nav-item"><a href="/my_blog/docs/theme-reco/" class="nav-link router-link-active"><i class="iconfont reco-message"></i>
  文章列表
</a></div> <!----></nav> <ul class="sidebar-links"><li><a href="/my_blog/" aria-current="page" class="sidebar-link">Home</a></li><li><a href="/my_blog/docs/theme-reco/Vue.html" class="sidebar-link">Vue</a></li><li><a href="/my_blog/docs/theme-reco/css3.html" class="sidebar-link">css3</a></li><li><a href="/my_blog/docs/theme-reco/jQuery.html" class="sidebar-link">jQuery</a></li><li><a href="/my_blog/docs/theme-reco/someKnowledge.html" aria-current="page" class="active sidebar-link">someKnowledge</a></li><li><a href="/my_blog/docs/theme-reco/mobile.html" class="sidebar-link">移动端</a></li></ul> </aside> <div class="password-shadow password-wrapper-in" style="display:none;" data-v-70a509e9 data-v-3def6117><h3 class="title" data-v-70a509e9 data-v-70a509e9>someKnowledge</h3> <!----> <label id="box" class="inputBox" data-v-70a509e9 data-v-70a509e9><input type="password" value="" data-v-70a509e9> <span data-v-70a509e9>Konck! Knock!</span> <button data-v-70a509e9>OK</button></label> <div class="footer" data-v-70a509e9 data-v-70a509e9><span data-v-70a509e9><i class="iconfont reco-theme" data-v-70a509e9></i> <a target="blank" href="https://vuepress-theme-reco.recoluan.com" data-v-70a509e9>vuePress-theme-reco</a></span> <span data-v-70a509e9><i class="iconfont reco-copyright" data-v-70a509e9></i> <a data-v-70a509e9><span data-v-70a509e9>fh</span>
            
          <!---->
          2021
        </a></span></div></div> <div data-v-3def6117><main class="page" style="padding-right:0;"><section><div class="page-title"><h1 class="title">someKnowledge</h1> <div data-v-71eee331><i class="iconfont reco-account" data-v-71eee331><span data-v-71eee331>fh</span></i> <i class="iconfont reco-date" data-v-71eee331><span data-v-71eee331>2020/5/28</span></i> <!----> <!----></div></div> <div class="theme-reco-content content__default"><h4 id="前端各类小知识"><a href="#前端各类小知识" class="header-anchor">#</a> 前端各类小知识</h4> <p>行内（内联）元素：不能设置宽高，不能嵌套块状元素
可变元素：</p> <h5 id="盒子模型"><a href="#盒子模型" class="header-anchor">#</a> 盒子模型</h5> <p>一个元素在页面所占大小
height/width/content/margin/padding/border</p> <p>css引入方法：
link  外链
style 内嵌
元素上 内联
import 能引进来别的东西，但是只会执行css的东西</p> <p>position:inherit  追随父级定位</p> <p>行内 - 块
display:block/table/inline-block/inline-table
position:fixed/absolute
float:left/right</p> <p>块 - 行内
display:inline</p> <p>http://  超文本传输协议
https:// ssl加密超文本传输</p> <p>html  超文本标记语言
css  层叠样式表
js  脚本语言</p> <p>三者之间的联系
html --结构    css -- 表现    js -- 行为</p> <p>作用域  作用一块区域的东西
函数就是一个作用域 里面声明（var）的东西外面拿不到
script标签也是作用域   从上向下能拿到，从下向上拿不到</p> <p>js预解析  -- js在执行前会先把所有代码以及var的东西过一遍
每个作用域都有自己的预解析</p> <p>window的方法可以省略window</p> <p>top = window
parent = window
this = window
self = window</p> <p>js分为2种报错
1.编译型错误    错误之前的代码会执行，之后的不执行
2.语法错误      代码写的有问题，所有程序都不执行</p> <p>html5只是一个w3c制定的一个协议
css3 升级版的css
js版本  ECMAScrtpt 1-3,5,6</p> <p>video audio nav footer header  h5新出的语义化标签  但是只有一部分被重用 如：video audio canvas
video -&gt; 视屏  只支持mp4 高清  体积大  不安全</p> <p>定义颜色的方法
background:red;
background:rgb(0,0,0);
background:rgba(0,0,0,.1);
background:#000000;
background:hsl(0,0%,0%);
background:hsla(0,0%,0%,.1);</p> <p>css3</p> <p>过渡动画   transition
transition 属性是一个简写属性，用于设置四个过渡属性： 书写顺序是延时时间要在过渡时间之后</p> <p>transition-property:all;  过渡样式
transition-duration:1s;  过渡时间
transition-timing-function:ease;  过渡动画形式  可以自己调试
transition-delay:1s;   延时时间</p> <p>变换 transform
transform 属性向元素应用 2D 或 3D 转换。该属性允许我们对元素进行旋转、缩放、移动或倾斜。
transform:rotate(30deg)   deg位度数  是个单位   turn也是一个单位   1turn = 360deg<br>
transform: perspective(800px)  景深  能转换为3D效果</p> <p>&amp;&amp; 前面条件一满足 就会往后看。
||  前面条件不满足就会一直看，看到满足的为止。</p> <p>transition : 1s ease all 1s;
transform : rotate  rotateX/Y  也可以做镜像
skew   skewX/Y
scaleX/Y     如果放负数就是镜像
translate位移  不影响未知
translate3d(x,y,z);
translate3d(100px,0,0); = translateX(100px);
如果想用 3d z轴 那么你的父级必须是3d 空间</p> <div class="language- extra-class"><pre><code>	   transform 是从后往前执行

	  demo:3d 盒子
	  -webkit-linear-gradient   线性渐变
	  如果不加-webkit- 只支持上下 和角度
	  加上都支持
	  不支持过渡

	  径向渐变
	  webkit-radial-gradient 
	  不支持角度，方向
	  不支持过渡

	  box-shadow 
	  x轴 y轴 blur模糊度 size大小 color颜色,inset内阴影 x轴 y轴 blur模糊度 size大小 color颜色

	 Mouseevent 鼠标事件
          传参数的 火狐支持ie不支持
          使用event 的 火狐不支持 ie支持

	text-shadow:x y blur color;
	clip-path
	x轴正常去看 y轴 反转去看
	polygon:多边形
	clip:修剪
	path:路径
</code></pre></div><p>transform-origin:left/top/center/%/px</p> <p>setInterval 当前网页被切走的时候 你页面的定时器就会变慢， 人家定时器低于1000 就会按照1000去计算</p> <p>video  只支持mp4文件
autoplay  自动播放
loop 循环播放
controls  控件 （不同浏览器控件显示不一样  大部分网站都自定义控件，自己写）
source  来源
播放 play()
暂停 pause()
constructor 看原型
duration  总时间
currentTime 当前的时间
volume  音量  0-1 0位静音  1为最大音
timeupdate 播放事件</p> <p>addEventListener('click',false)  事件监听  脚本会叠加 不会覆盖
removeEventListener('click',函数名,false)</p> <p>var a = document.querySelector('...')   会找到符合他条件的第一个
var a =  document.querySelectorAll('...')会找到符合他条件的所有元素</p></div></section> <footer class="page-edit"><!----> <div class="last-updated"><span class="prefix">最后更新时间: </span> <span class="time">2021/9/17 下午4:58:22</span></div></footer> <div class="page-nav"><p class="inner"><span class="prev"><a href="/my_blog/docs/theme-reco/jQuery.html" class="prev">
            jQuery
          </a></span> <span class="next"><a href="/my_blog/docs/theme-reco/mobile.html">
            移动端
          </a></span></p></div> <div class="comments-wrapper"><!----></div> <ul class="side-bar sub-sidebar-wrapper" style="width:0;" data-v-65c007c6></ul></main> <!----></div></div></div></div><div class="global-ui"><div class="back-to-ceiling" style="right:1rem;bottom:6rem;width:2.5rem;height:2.5rem;border-radius:.25rem;line-height:2.5rem;display:none;" data-v-a008c6ba data-v-a008c6ba><svg t="1574745035067" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5404" class="icon" data-v-a008c6ba><path d="M526.60727968 10.90185116a27.675 27.675 0 0 0-29.21455937 0c-131.36607665 82.28402758-218.69155461 228.01873535-218.69155402 394.07834331a462.20625001 462.20625001 0 0 0 5.36959153 69.94390903c1.00431239 6.55289093-0.34802892 13.13561351-3.76865779 18.80351572-32.63518765 54.11355614-51.75690182 118.55860487-51.7569018 187.94566865a371.06718723 371.06718723 0 0 0 11.50484808 91.98906777c6.53300375 25.50556257 41.68394495 28.14064038 52.69160883 4.22606766 17.37162448-37.73630017 42.14135425-72.50938081 72.80769204-103.21549295 2.18761121 3.04276886 4.15646224 6.24463696 6.40373557 9.22774369a1871.4375 1871.4375 0 0 0 140.04691725 5.34970492 1866.36093723 1866.36093723 0 0 0 140.04691723-5.34970492c2.24727335-2.98310674 4.21612437-6.18497483 6.3937923-9.2178004 30.66633723 30.70611158 55.4360664 65.4791928 72.80769147 103.21549355 11.00766384 23.91457269 46.15860503 21.27949489 52.69160879-4.22606768a371.15156223 371.15156223 0 0 0 11.514792-91.99901164c0-69.36717486-19.13165746-133.82216804-51.75690182-187.92578088-3.42062944-5.66790279-4.76302748-12.26056868-3.76865837-18.80351632a462.20625001 462.20625001 0 0 0 5.36959269-69.943909c-0.00994388-166.08943902-87.32547796-311.81420293-218.6915546-394.09823051zM605.93803103 357.87693858a93.93749974 93.93749974 0 1 1-187.89594924 6.1e-7 93.93749974 93.93749974 0 0 1 187.89594924-6.1e-7z" p-id="5405" data-v-a008c6ba></path><path d="M429.50777625 765.63860547C429.50777625 803.39355007 466.44236686 1000.39046097 512.00932183 1000.39046097c45.56695499 0 82.4922232-197.00623328 82.5015456-234.7518555 0-37.75494459-36.9345906-68.35043303-82.4922232-68.34111062-45.57627738-0.00932239-82.52019037 30.59548842-82.51086798 68.34111062z" p-id="5406" data-v-a008c6ba></path></svg></div><canvas id="vuepress-canvas-cursor"></canvas></div></div>
    <script src="/my_blog/assets/js/app.cff69041.js" defer></script><script src="/my_blog/assets/js/3.7a043b16.js" defer></script><script src="/my_blog/assets/js/1.c06040f4.js" defer></script><script src="/my_blog/assets/js/17.06159aba.js" defer></script>
  </body>
</html>
